import * as React from 'react';
import s from './index.module.scss'
import {useLocation} from 'react-router-dom'
export default function Detail(){
    //console.log(useLocation());
    
    // let {pathname,state}=useLocation()
    // console.log(pathname);
    
    //let useparams = useParams()
    //console.log(useparams);
    let { state } = useLocation()
    //console.log(state);
    
    let {img,title,time} = state as {img:string,title:string,time:string}
    return (
        <div className={s.page}>
            <img src={img} alt="" />
            <div className={s.title}>{title}</div>
            <div className={s.time}>{time}</div>
        </div>
    )
}